package com.geotmt.billingcenter.common.enumpackage;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description 规则类型（表）
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/25 18:48
 * @Version     v1
 **/
public enum RuleLabelEnum {

    /**
     *  1：consume_curr  2:consume_his  3:cost_curr  4:cost_his
     */
    CONSUME_CURR(1, "消耗(最新)"),
    CONSUME_HIS(2, "消耗(历史)"),
    COST_CURR(3, "成本(最新)"),
    COST_HIS(4, "成本(历史)");

    public Integer value;

    public String memo;

    RuleLabelEnum(Integer value, String memo) {
        this.value = value;
        this.memo = memo;
    }

    private static final Map<Integer, RuleLabelEnum> lookup = new HashMap<Integer, RuleLabelEnum>();

    static {
        for (RuleLabelEnum s : EnumSet.allOf(RuleLabelEnum.class)) {
            lookup.put(s.value, s);
        }
    }

    public static RuleLabelEnum get(Integer value) {
        return lookup.get(value);
    }
}
